<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	BaseForm form = (BaseForm)request.getAttribute("command");
	String tab = form.getTab();
	UserInfo user = (UserInfo)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	String staffid = user.getEmployId();
	String status = "0";
	String vaudit = "1";
%>
<div id="childLayout" class="easyui-layout" data-options="fit:true">
	<div data-options="region:'west',split:true,maxWidth:220,collapsible:true,style:{borderWidth:2},onResize:function(){XF.LAYOUT.resizeWest();}" style="background: #f7f7f9;width:220px;" title=" ">
		 <div class="sidebar">
			<div id="sidebar" class="easyui-accordion" style="width:auto;height:auto;">
				<sec:authorize ifAllGranted="MANAGE_VISITOR"> 
					<div title="访客管理"  style="overflow:auto;padding:10px;">  
						<ul class="site-ul">
								<li class="site-li">
									<a s="addVisitor" href="javascript:XF.Visitor.addVisitor()"><span>访客登记</span></a>
								</li>
							<li class="site-li">
								<a s="visitorList" href="javascript:XF.Visitor.listVisitor()"><span>访客查询</span></a>
							</li>
							<li class="site-li">
								<a s="appointList" href="javascript:XF.Visitor.listAppoint(<%=status %>,<%=vaudit %>)"><span>预约查询</span></a>
							</li>									
						</ul>
					</div>
				</sec:authorize>
				<sec:authorize ifAllGranted="MANAGE_VISITOR">
					<div title="快递管理"  style="overflow:auto;padding:10px;"> 
						<ul class="site-ul">
							<li class="site-li">
								<a s="addExpress" href="javascript:XF.Visitor.addExpress()"><span>快递登记</span></a>
							</li>
							<li class="site-li">
								<a s="expressList" href="javascript:XF.Visitor.listExpress()"><span>快递查询</span></a>
							</li>
						</ul>
					</div>
				</sec:authorize>
				<sec:authorize ifAllGranted="VISITOR_APPOINT">
					<div title="预约管理"  style="overflow:auto;padding:10px;"> 
						<ul class="site-ul">
							<li class="site-li">
								<a s="addAppoint" href="javascript:XF.Visitor.addAppoint()"><span>预约登记</span></a>
							</li>
							<li class="site-li">
								<a s="myAppointList" href="javascript:XF.Visitor.listMyAppoint(<%=user.getEmployId()+"" %>)"><span>我的预约</span></a>
							</li>
						</ul>
					</div>
				</sec:authorize>
			</div>
		</div>
	</div>
	<div id="visitorCenter" class="settingCenter" data-options="region:'center'">
	</div>
</div>
<script type="text/javascript">
	$(function(){
		$('#childLayout').layout();
		XF.NAV.activeTab('"<%=tab%>"');
	    $('#sidebar').accordion({
	        animate:true
	    });
	});
</script>
</html>